home *** CD-ROM | disk | FTP | other *** search
- // FILARRAY.H : a file array class
- // Author : Jian Hua, 04/01/93
- // Compiler : Borland C++ 3.1
- // (c) Jian Hua. Source may be used freely if author is acknowledged.
- // Object files may be used freely
-
- #ifndef __FILARRAY_H
- #define __FILARRAY_H
- #include <fstream.h>
-
- struct SDTHEADER
- {
- char first; // will be set 0x1A
- int id; // will be set í=161
- long strCtxLen; // string context area len
- int offsetArraySize; // offset array size
- // offset array area len = offsetArraySize * sizeof(long)
- };
-
- class FileArray
- {
- public:
- FileArray(const char* = "iep.sdt");
- ~FileArray();
- char* operator[](int ndx);
-
- private:
- void updatePtr(int len);
- SDTHEADER headInfo;
- ifstream is;
- char* ptrStr[5];
- int count;
- int OK;
- };
-
- #endif
-